<?php
	require "../dao/student_dao.php";
	
	$spass = $_POST['spass'];
	$snumber = $_POST['snumber'];
	
	$student = selectStuByPassAndNum($spass, $snumber);
	if($student){
		session_start();
		$_SESSION['student'] = $student;
		header("location:Student.php");
	}else{
?>
		<script>
			alert("登陆失败，请输入正确的信息");
			location.href = "Stu_login.php";
		</script>
<?php
	}
?>